/* 
 * File:   mainServah.cpp
 * Author: Bram
 *
 * Created on January 9, 2013, 12:44 PM
 */

#include <cstdlib>
#include <iostream>

#include "MainServer.h"
#include "Factory.h"
#include "Command.h"

int main(int argc, char** argv) {
    
    
    MainServer * ms = new MainServer();
    //ms->StopClient();
    //ms->StartServer();
    ms->StartClient();
    
    delete ms;
    
    /*
    string commandstr = "DIR:\"test.rar\"";
    string xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?><Command Name=\"DIR\" Sender=\"SERVER\" Type=\"END\" ><Parameters><Parameter>Test</Parameter></Parameters></Command>";
    //Command* command = Factory::createFromUserInput(commandstr);
    Command* command = Factory::createFromXml(xml);;
    cout << command->getName() << endl;
    cout << command->getType() << endl;
    cout << command->getSender() << endl;
    for(int i = 0; i < 5; i++)
    {
        string parameter;
        if(command->getParameterAtIndex(i,parameter))
        {
            cout << parameter << endl;
        }
    }
     */
    
    return 0;
}
